import $http from '../utils/request.js'

export function getUserInfo() {
	return $http.httpRequest({
		url: '/users/show'
	})
}

export function updateScoreValue(query) {
	return $http.httpRequest({
		url: '/miniProgramForApplet/userInfo/updateScoreValue',
		methods: 'POST',
		headers: 'application/json',
		data: query
	})
}

export function getGradelist() {
	return $http.httpRequest({
		url: '/config/index'
	})
}

// 获取学校列表
export function getSchoolList(query) {
	return $http.httpRequest({
		url: '/university/index',
		data:query
	})
}

// 更新用户信息
export function updateUserInfo(query) {
	return $http.httpRequest({
		url: '/users/update',
		methods: 'POST',
		headers: 'application/json',
		data: query
	})
}

export function getDonationIntegrallList(query) {
	return $http.httpRequest({
		url: '/users/donatelists',
		data:query
	})
}

export function getPhone(query) {
	return $http.httpRequest({
		url: '/users/getphone',
		methods: 'POST',
		headers: 'application/json',
		data: query
	})
}